Skip to content

Conversation

@MaxyMoos
Copy link

Module

account_payment_order

Describe the bug

Clicking on the Cancel Payments button on a Payment Order can raise an Exception:
image

To Reproduce

Affected versions: 17.0

  1. On a Supplier Invoice, click on the Add to Payment Order button
  2. On the Payment Order, click on the Confirm Payments button, then on the Cancel Payments button
    -> An error message appears, as calling action_draft() on draft moves raises a UserError which blocks the "Cancel Payments" button from working properly

The Cancel Payments button works properly once the Payment Order has reached the uploaded state, but not before, according to my tests.

This fix just filters out account.payment-linked moves by their state so they are only impacted by the action_draft call if they are not already in draft state.

payments

Calling `action_draft()` on `draft` moves raises a UserError which
blocks the "Cancel Payments" button from working properly.
@MaxyMoos MaxyMoos force-pushed the 17.0-account_payment_order-fix-cancel-payments-draft-move branch from b922b4f to 84dec6b Compare October 29, 2025 12:59
@pedrobaeza pedrobaeza added this to the 17.0 milestone Oct 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants